Skip to content

feat: refactor sync requests to use driveServerClient#267

Merged
egalvis27 merged 2 commits intomainfrom
refactor/replace-http-client-on-sync-requests
Mar 11, 2026
Merged

feat: refactor sync requests to use driveServerClient#267
egalvis27 merged 2 commits intomainfrom
refactor/replace-http-client-on-sync-requests

Conversation

@egalvis27
Copy link

What is Changed / Added


Why

Comment on lines +332 to +339
const { data, error } = await driveServerClient.GET('/files', {
query: {
limit: this.config.fetchFilesLimitPerRequest,
offset: 0,
status: 'ALL',
updatedAt: updatedAtCheckpoint?.toISOString(),
},
});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this a reusable function inside src/infra/drive-server/files/services where we store the rest of the file related api calls.
This way its reusable. we can test it in isolation and we also hide complexity to where its needed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment on lines +370 to +377
const { data, error } = await driveServerClient.GET('/folders', {
query: {
limit: this.config.fetchFilesLimitPerRequest,
offset: 0,
status: 'ALL',
updatedAt: updatedAtCheckpoint?.toISOString(),
},
});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
37.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@egalvis27 egalvis27 merged commit 6590f57 into main Mar 11, 2026
8 of 9 checks passed
@egalvis27 egalvis27 deleted the refactor/replace-http-client-on-sync-requests branch March 11, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants